package com.wing.qualification.model.entity;

import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.enums.IEnum;
import com.wing.mybatis.common.BaseEntity;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 资质管理
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("qua_qualification")
public class Qualification extends BaseEntity<Qualification> implements Serializable {

    private static final long serialVersionUID = 1L;

    public enum Status implements IEnum<Integer> {

        /**
        * 显示
        */
        show(0,"显示"),
        /**
        * 隐藏
        */
        hide(1,"隐藏");

        private int code;
        private String desc;

        Status(int code,String desc){
            this.code=code;
            this.desc=desc;
        }

        @Override
        public Integer getValue(){
            return this.code;
        }

        public String getDesc(){
            return this.desc;
        }
    }

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 资质类型
     */
    private Long qualificationTypeId;

    /**
     * 认证机构
     */
    private String certification;

    /**
     * 状态
     */
    private Integer status;

    /**
    * 状态描述
    */
    @TableField(exist = false)
    private String statusDesc;


    /**
     * 资质名称
     */
    private String name;

    /**
     * 资质照片
     */
    private String qualificationUrl;

    /**
    * 资质有效开始期
    */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    /**
    * 资质有效终止期
    */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime stopTime;

    /**
     * 资质描述
     */
    private String qualificationDescribe;

}
